<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = [1,8,4,8,6,5,4]
        let arr1 = new Set(arr)
        console.log(arr1);
        // 转成数组
        let newArr = [...arr1]
        console.log(newArr);
    </script>
</body>
</html>